Remove XCSV_ENABLED, MAXIMAL_ENABLED, MINIMAL_ENABLED (#1238)
authorRobert Lipe <robertlipe@users.noreply.github.com>
Sat, 14 Sep 2024 12:21:53 +0000 (07:21 -0500)
committerGitHub <noreply@github.com>
Sat, 14 Sep 2024 12:21:53 +0000 (12:21 +0000)
Remove XCSV_ENABLED, MAXIMAL_ENABLED, MINIMAL_ENABLED
---------

Co-authored-by: Robert Lipe <robertlipe@gpsbabel.org>
CMakeLists.txt
garmin_txt.cc
garmin_txt.h
main.cc
vecs.cc
xcsv.cc
xcsv.h

index 2193b851b061d1f8d51d99e568b2ee46209c0fae..c9694b04c487b0706ed898d935c1af178c500cf9 100644 (file)
@@ -338,8 +338,8 @@ list(SORT HEADERS)
 target_sources(gpsbabel PRIVATE ${SOURCES} ${HEADERS})
 
 # We don't care about stripping things out of the build.  Full monty, baby.
-target_compile_definitions(gpsbabel PRIVATE MAXIMAL_ENABLED)
 target_compile_definitions(gpsbabel PRIVATE FILTERS_ENABLED)
+target_compile_definitions(gpsbabel PRIVATE SHAPELIB_ENABLED)
 target_compile_definitions(gpsbabel PRIVATE CSVFMTS_ENABLED)
 
 target_link_libraries(gpsbabel PRIVATE ${QT_LIBRARIES} ${LIBS})
index fdd4fdf465e83fed7d6ef6377be0025cdf9bb21f..1ed008080522e32c763ef902941d038672ffc88d 100644 (file)
@@ -20,8 +20,6 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
  */
-#if CSVFMTS_ENABLED
-
 #include "garmin_txt.h"
 
 #include <algorithm>               // for for_each, sort
@@ -1372,4 +1370,3 @@ GarminTxtFormat::read()
 
   }
 }
-#endif // CSVFMTS_ENABLED
index 82346a3870fece6f8a5abc74ec6c4316081e031f..2b815b475f094551bad02de2f3fae4bb2ffddeb1 100644 (file)
@@ -23,8 +23,6 @@
 #ifndef GARMIN_TXT_H_INCLUDED_
 #define GARMIN_TXT_H_INCLUDED_
 
-#if CSVFMTS_ENABLED
-
 #include <array>                  // for array
 #include <cstdint>                // for uint16_t
 #include <ctime>                  // for time_t
@@ -199,5 +197,4 @@ private:
   PathInfo* cur_info{};
 };
 
-#endif // CSVFMTS_ENABLED
 #endif // GARMIN_TXT_H_INCLUDED_
diff --git a/main.cc b/main.cc
index 2060ef768ed2526748e9b02311b1a2d6277101ed..41c5019c6ce2934323eb3d3c57393006dab15d17 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -186,10 +186,6 @@ print_extended_info()
     "FILTERS_ENABLED "
 #endif
 
-#if CSVFMTS_ENABLED
-    "CSVFMTS_ENABLED "
-#endif
-
 #if SHAPELIB_ENABLED
     "SHAPELIB_ENABLED "
 #endif
diff --git a/vecs.cc b/vecs.cc
index 1a232f408954bdcf8c90261acac20871e4b8c70d..12fa0c52e85979affc019abcfbde36e6848484e6 100644 (file)
--- a/vecs.cc
+++ b/vecs.cc
@@ -105,7 +105,6 @@ struct Vecs::Impl {
   NmeaFormat nmea_fmt;
   OziFormat ozi_fmt;
   KmlFormat kml_fmt;
-#if MAXIMAL_ENABLED
   LowranceusrFormat lowranceusr_fmt;
   Tpo2Format tpo2_fmt;
   Tpo3Format tpo3_fmt;
@@ -119,13 +118,9 @@ struct Vecs::Impl {
   MtkFileFormat mtk_ffmt;
   MtkM241Format mtk_m241_fmt;
   MtkM241FileFormat mtk_m241_ffmt;
-#endif // MAXIMAL_ENABLED
-#if MAXIMAL_ENABLED
   UnicsvFormat unicsv_fmt;
   GtmFormat gtm_fmt;
-#if CSVFMTS_ENABLED
   GarminTxtFormat garmin_txt_fmt;
-#endif // CSVFMTS_ENABLED
   GtrnctrFormat gtc_fmt;
   GarminGPIFormat garmin_gpi_fmt;
   RandomFormat random_fmt;
@@ -145,10 +140,8 @@ struct Vecs::Impl {
   GarminFitFormat format_fit_fmt;
   GeoJsonFormat geojson_fmt;
   GlobalsatSportFormat globalsat_sport_fmt;
-#endif // MAXIMAL_ENABLED
 
   const QVector<vecs_t> vec_list {
-#if CSVFMTS_ENABLED
     /* XCSV must be the first entry in this table. */
     {
       nullptr,
@@ -158,7 +151,6 @@ struct Vecs::Impl {
       nullptr,
       &fmtfactory<XcsvFormat>
     },
-#endif
     {
       nullptr,
       "geo",
@@ -209,7 +201,6 @@ struct Vecs::Impl {
       "kml",
       nullptr,
     },
-#if MAXIMAL_ENABLED
     {
       &lowranceusr_fmt,
       "lowranceusr",
@@ -297,8 +288,6 @@ struct Vecs::Impl {
       "bin",
       nullptr,
     },
-#endif // MAXIMAL_ENABLED
-#if MAXIMAL_ENABLED
     {
       nullptr,
       "vcard",
@@ -321,7 +310,6 @@ struct Vecs::Impl {
       "gtm",
       nullptr,
     },
-#if CSVFMTS_ENABLED
     {
       &garmin_txt_fmt,
       "garmin_txt",
@@ -329,7 +317,6 @@ struct Vecs::Impl {
       "txt",
       nullptr,
     },
-#endif // CSVFMTS_ENABLED
     {
       &gtc_fmt,
       "gtrnctr",
@@ -487,7 +474,6 @@ struct Vecs::Impl {
       nullptr,
       &fmtfactory<GoogleTakeoutFormat>
     }
-#endif // MAXIMAL_ENABLED
   };
 };
 
@@ -769,7 +755,6 @@ void Vecs::prepare_format(const fmtinfo_t& fmtdata)
     disp_vec_options(fmtdata.fmtname, args);
   }
 
-#if CSVFMTS_ENABLED
   /*
    * For style based formats let xcsv know the style file.  Otherwise
    * make sure xcsv knows no style file is in use. This covers the case
@@ -780,7 +765,6 @@ void Vecs::prepare_format(const fmtinfo_t& fmtdata)
   if (xcsvfmt != nullptr) {
     xcsvfmt->xcsv_setup_internal_style(fmtdata.style_filename);
   }
-#endif // CSVFMTS_ENABLED
 }
 
 Vecs::fmtinfo_t Vecs::find_vec(const QString& fmtargstring)
@@ -909,7 +893,6 @@ QVector<Vecs::vecinfo_t> Vecs::sort_and_unify_vecs() const
     }
   }
 
-#if CSVFMTS_ENABLED
   /* The style formats are based on the xcsv format,
    * Make sure we know which entry in the vector list that is.
    */
@@ -967,7 +950,6 @@ QVector<Vecs::vecinfo_t> Vecs::sort_and_unify_vecs() const
   if (d_ptr_->vec_list.at(0).factory != nullptr) {
     delete xcsvfmt;
   }
-#endif // CSVFMTS_ENABLED
 
   /*
    *  Display the available formats in a format that's easy for humans to
diff --git a/xcsv.cc b/xcsv.cc
index 050f2b231cf86c4f53c0a6183b6d62bf240b01f2..5f4c1ba301d41356dc2bd550300e895bc98ac741 100644 (file)
--- a/xcsv.cc
+++ b/xcsv.cc
@@ -65,8 +65,6 @@
 #include "strptime.h"              // for strptime
 
 
-#if CSVFMTS_ENABLED
-
 #define MYNAME "XCSV"
 
 const QHash<QString, XcsvStyle::xcsv_token> XcsvStyle::xcsv_tokens {
@@ -2038,4 +2036,3 @@ XcsvFormat::wr_position(Waypoint* wpt)
 
   xcsv_file->stream.flush();
 }
-#endif //CSVFMTS_ENABLED
diff --git a/xcsv.h b/xcsv.h
index 7d434925965ee4db42344bd492405f3669dfb60f..c1fb2551b7950af26fa5d2ef588ff924a1f1d01b 100644 (file)
--- a/xcsv.h
+++ b/xcsv.h
@@ -43,8 +43,6 @@
 #include "src/core/datetime.h"    // for DateTime
 #include "src/core/textstream.h"  // for TextStream
 
-#if CSVFMTS_ENABLED
-
 /*
  * Class describing an xcsv format.
  */
@@ -427,5 +425,4 @@ private:
 
 };
 
-#endif // CSVFMTS_ENABLED
 #endif // XCSV_H_INCLUDED_